package com.example.entity;

import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import jakarta.persistence.Column;

import java.util.Objects;
import java.util.Random;

@Entity
@Table(name = "vehicle")
public class Vehicle {

    @Id
    @Column(name = "license_plate", unique = true, nullable = false)
    private String licensePlate;

    private String model;
    private VehicleType type;
    private int seats;
    private boolean canCarpool;
    private boolean isAutonomous;
    private VehicleStatus status;
    private double latitude;
    private double longitude;

    public Vehicle() {
    }

    public String getLicensePlate() {
        return licensePlate;
    }

    public void setLicensePlate(String licensePlate) {
        this.licensePlate = licensePlate;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public VehicleType getType() {
        return type;
    }

    public void setType(VehicleType type) {
        this.type = type;
    }

    public int getSeats() {
        return seats;
    }

    public void setSeats(int seats) {
        this.seats = seats;
    }

    public boolean isCanCarpool() {
        return canCarpool;
    }

    public void setCanCarpool(boolean canCarpool) {
        this.canCarpool = canCarpool;
    }

    public boolean isAutonomous() {
        return isAutonomous;
    }

    public void setIsAutonomous(boolean autonomous) {
        isAutonomous = autonomous;
    }

    public VehicleStatus getStatus() {
        return status;
    }

    public void setStatus(VehicleStatus status) {
        this.status = status;
    }

    public double getLatitude() {
        return latitude;
    }

    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }

    public double getLongitude() {
        return longitude;
    }

    public void setLongitude(double longitude) {
        this.longitude = longitude;
    }

    public double calculateDistance(Vehicle assignedVehicle) {
        return 0.01;
    }
}


